<html>
<head><meta charset="utf-8"><title>format on save and rustc · t-compiler/rust-analyzer · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/index.html">t-compiler/rust-analyzer</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/format.20on.20save.20and.20rustc.html">format on save and rustc</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="193102727"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/format%20on%20save%20and%20rustc/near/193102727" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/format.20on.20save.20and.20rustc.html#193102727">(Apr 06 2020 at 21:13)</a>:</h4>
<p>Hmm so, when editing rustc at least, i'm not finding that "format on save" is working. I've got the vscode option enabled. I'm not sure why this might be? Something I can look to ..?</p>
<p>Also, is it possible to configure the path to rustfmt that rust-analyzer uses?</p>



<a name="193102804"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/format%20on%20save%20and%20rustc/near/193102804" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/format.20on.20save.20and.20rustc.html#193102804">(Apr 06 2020 at 21:14)</a>:</h4>
<p>Also, is "format on save" functionality implemented in the LSP server, or the vscode plugin?</p>



<a name="193102937"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/format%20on%20save%20and%20rustc/near/193102937" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/format.20on.20save.20and.20rustc.html#193102937">(Apr 06 2020 at 21:15)</a>:</h4>
<p>Ah, I might not have had the extension setup on this particular ssh host</p>



<a name="193105723"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/format%20on%20save%20and%20rustc/near/193105723" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/format.20on.20save.20and.20rustc.html#193105723">(Apr 06 2020 at 21:41)</a>:</h4>
<p>The option to override rustfmt is “rust-analyzer.rustfmt.overrideCommand”.</p>
<p>The general “reformat” functionality is in LSP, “format on save” is how an<br>
editor might choose to expose this functionality.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>